<script>
	export default {
		onLaunch() {
			const that = this
			uni.getSystemInfo({
				success: (res) => {
					that.globalData.windowWidth = res.windowWidth
					that.globalData.windowHeight = res.windowHeight
					that.globalData.pixelRatio = res.pixelRatio
					that.globalData.statusBarHeight = res.statusBarHeight
				}
			})
		},
		onShow() {
		},
		onHide() {
		},
		onError(err) {
			// #ifdef APP-PLUS
			
			let pages = getCurrentPages();
			let pageRoute = "";
			if (pages.length > 0) {
				var page = pages[pages.length - 1];
				var currentWebview = page.$getAppWebview();
				pageRoute = currentWebview.__uniapp_route;
			}
			let log = {
				message: err.message,
				stack: err.stack,
				route: pageRoute
			}
			
			this.$xt.api.login(log)

			// #endif
		},
		globalData: {
			pixelRatio: 1,
			windowWidth: 0,
			windowHeight: 0
		}
	}
</script>

<style lang="scss">
	
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";
	page{
		background-color: #F5F7FB;
	}
	/* #ifndef APP-NVUE */
	image {
		will-change: transform
	}
	/* #endif */
</style>
